package com.joyintech.enums;

/**
 * 是否面向合格投资者(01-是/02-否)
 */
public enum IsQualifiedEnum {

    YES("1","是"),
    NOT("0","否"),
    ;

    private String code;
    private String name;

    IsQualifiedEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static IsQualifiedEnum getNameByCode(String code) {
        for (IsQualifiedEnum codeEnum : IsQualifiedEnum.values()) {
            if (codeEnum.getCode().equals(code)) {
                return codeEnum;
            }
        }
        return null;
    }
}
